package com.hospital.ui.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.LinearLayout;

public abstract class BasePageLayout extends LinearLayout implements IBaseWidget{
    protected Context mContext;
    private boolean hasInit;

	public BasePageLayout(Context context, AttributeSet attrs) {
		super(context, attrs);
		mContext = context;
	}

	public BasePageLayout(Context context) {
		super(context);
		mContext = context;
	}
	
	abstract public void onInit();

	@Override
	protected void onLayout(boolean changed, int l, int t, int r, int b) {
		// TODO Auto-generated method stub
		super.onLayout(changed, l, t, r, b);
		if(!hasInit){
			onInit();
			hasInit = true;
		}
	}
}
